<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="full-screen" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="white">
    <meta name="format-detection" content="telephone=no"/>
    <meta name="format-detection" content="address=no">
    <script src="../../js/jquery-2.1.1.min.js"></script>
    <script type="text/javascript">
        var docEl = document.documentElement;
        var clientWidth = docEl.clientWidth;
        docEl.style.fontSize = (clientWidth / 10) + 'px';
        $(document).ready(function () {
            (function (doc, win) {
                var docEl = doc.documentElement,
                        resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
                        recalc = function () {
                            var clientWidth = docEl.clientWidth;
                            docEl.style.fontSize = (clientWidth / 10) + 'px';
                        };

                if (!doc.addEventListener) return;
                win.addEventListener(resizeEvt, recalc, false);
                doc.addEventListener('DOMContentLoaded', recalc, false);
            })(document, window);
        });
    </script>
    <link rel="stylesheet" href="../../style/css/index.css"/>
</head>
<body>
<div style="background: #f7f7f7;width: 100%;">
    <!--header-->
    <div class="header">
        <img class="back" onclick="history.go(-1);" src="../../style/images/sg_ic_back.png" alt=""/>

        <p class="orderName">我的订单</p>
    </div>
    <!-- content-->
    <ul class="Orderlist">
        <li class="choose">全部</li>
        <li>待付款</li>
        <li>待发货</li>
        <li>待收货</li>
        <li>待评价</li>
    </ul>
    <div  id="main">
        <!-- <div class="contactWay" style="margin-top:10px;padding-top:0;margin-bottom:10px;">
            <ul>
                <li>
                    <div class="title">
                        <span>代付款</span>
                    </div>
                    <div style="width: 100%;margin-bottom: 0;">
                        <img class="food_pic" src="' + n.img_path + '" alt="" id="image"/>
                        <div class="food_name">
                            <p id="title">chensiyu都发生大幅度释放三大江河发生大幅度上刊发后决定是否金卡卡死的事an</p>
                            <span class="price" id="price">￥12</span>
                            <span style="float:right;font-size: 12px;margin-top: 0.5rem;color: #999;">x1</span>
                        </div>
                        <div class="clear"></div>
                  </div>
                  <div class="bottom_tool">
                        <span class="pay_money">实付款：￥109</span>
                        <div class="pay_now">立即支付</div>
                        <div class="clear"></div>
                  </div>
                </li>
            </ul>
        </div> -->
    </div>    
</div>
</body>
</html>
<script src="../../js/md5.js"></script>
<script src="../../js/md5_need.js"></script>
<script src="../../js/queryString.js"></script>
<script type="text/javascript" charset="utf-8">
    $(document).ready(function () {
        var indexJs = {
            getfruit: function () {
                var data = {
                    apiCode: '_login_001',
                    username: 18368169357,
                    loginPass: 123456
                };
                http(data, function (responed) {
                    var $info = responed.info;
                    var $userToken = $info.userToken;
                    window.localStorage.setItem("userToken", $userToken);
                })
            },
            getlist: function () {
                var data = {
                    apiCode: '_invest_list_001',
                    userToken: window.localStorage.getItem("userToken")
                };
                http(data, function (responed) {
                    console.log(responed);
                    var $info=responed.info;
                    // console.log($info[goodlist][0]);
                    var temp='';
                    $.each($info,function(i,n){
                        temp+='<div class="contactWay" style="margin-top:10px;padding-top:0;margin-bottom:10px;">';
                        temp+='<ul>';
                        temp+='<li>';
                        temp+='<div class="title">';
                        temp+='<span>'+n.status_name+'</span>';
                        temp+='</div>';
                        $.each($info[i].goodlist,function(o,p){
                            temp+='<div style="width: 100%;    margin-bottom: 6px;">';
                            temp+='<img class="food_pic" src="' + p.img_path + '" alt="" id="image"/>';
                            temp+='<div class="food_name">';
                            temp+='<p id="title">'+p.good_name+'</p>'; 
                            temp+='<span class="price" id="price">￥'+p.min_price+'</span>';
                            temp+='<span style="float:right;font-size: 12px;margin-top: 0.5rem;color: #999;">x'+p.count+'</span>';
                            temp+='</div>';
                            temp+='<div class="clear"></div>';
                            temp+='</div>';
                        });
                        temp+='<div class="bottom_tool">';
                        temp+='<span class="pay_money">实付款：￥109</span>';
                        if(n.status_name=="待付款"){
                            temp+='<div class="pay_now">立即支付</div>';
                        }else if(n.status_name=="待发货"){
                            temp+='<div class="pay_now">提醒发货</div>';
                        }else if(n.status_name=="待收货"){
                            temp+='<div class="pay_now">确认收货</div>';
                        }else if(n.status_name=="待评价"){
                            temp+='<div class="pay_now">立即评价</div>';
                        }else if(n.status_name=="已取消"){
                            temp+='<div class="pay_now">删除订单</div>';
                        }
                        
                        temp+='<div class="clear"></div>';
                        temp+='</div>';
                        temp+='</li>';
                        temp+='</ul>';
                        temp+='</div>';
                    });
                    $("#main").append(temp);
                })
            }   
        }
        indexJs.getfruit();
        indexJs.getlist();
    });
</script>